﻿using System;

namespace enyo
{
    [NonScript]
    public abstract class KeyboardType
    {
        public static implicit operator KeyboardType(int val)
        {
            return null;
        }

        public const int Text = 0;
        public const int Password = 1;
        public const int Search = 2;
        public const int Range = 3;
        public const int Email = 4;
        public const int Number = 5;
        public const int Phone = 6;
        public const int URL = 7;
        public const int Color = 8;
    }

    [ImportClass("enyo", "keyboard")]
    public class Keyboard
    {
        /// <summary>
        /// If resizesWindow is true (the default value), sets the keyboard mode to resize the application window to fit the keyboard; 
        /// if false, sets the keyboard mode to display the keyboard on top of application content.
        /// </summary>
        /// <param name="resizesWindow"></param>
        public static void SetResizesWindow(bool resizesWindow)
        {
        }

        /// <summary>
        /// Hides the keyboard. Requires the keyboard to be in manual mode, so call enyo.keyboard.setManualMode(true) first.
        /// </summary>
        public static void Hide()
        {
        }

        /// <summary>
        /// Shows the keyboard. Requires the keyboard to be in manual mode, so call enyo.keyboard.setManualMode(true) first.
        /// </summary>
        /// <param name="type">
        /// </param>
        public static void Show(KeyboardType type)
        {
        }

        /// <summary>
        /// If manual is true, sets the keyboard to be in manual mode. In manual mode, the keyboard will not automatically display when an element that can receive key input is focused or blurred.
        /// Also, while in manual mode, it's possible to show or hide the keyboard by calling enyo.keyboard.show or enyo.keyboard.hide, respectively.
        /// </summary>
        /// <param name="manual"></param>
        public static void SetManualMode(bool manual)
        {
        }

        /// <summary>
        /// Forces the keyboard to show by setting manual keyboard mode and then showing the keyboard. See enyo.keyboard.show for inType values.
        /// </summary>
        /// <param name="type"></param>
        public static void ForceShow(KeyboardType type)
        {
        }

        /// <summary>
        /// Forces the keyboard to hide by setting manual keyboard mode and then hiding the keyboard.
        /// </summary>
        public static void ForceHide()
        {
        }

        /// <summary>
        /// Returns true if the keyboard is showing, or false if it isn't.
        /// </summary>
        /// <returns></returns>
        public static bool IsShowing()
        {
            return false;
        }

        /// <summary>
        /// Returns true if the keyboard is in manual mode, or false if it isn't.
        /// </summary>
        /// <returns></returns>
        public static bool IsManualMode()
        {
            return false;
        }
    }
}
